Adwaita: Make selector more specific
authorBenjamin Otte <otte@redhat.com>
Thu, 27 Aug 2015 18:18:40 +0000 (20:18 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 27 Aug 2015 18:18:40 +0000 (20:18 +0200)
A * selector applies to all widgets, so even GtkBox or GtkGrid - and
most importantly GtkListBoxRow - need to recompute their style because
of the * selector.

By using a more specific one, these common cases aren't affected
anymore.

Fixes slowdowns in gtk3-demo's listbox demo and in gnome-software.

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index 74a8a7f179657d8a76c91a483f435e9344bb3604..39c3d4dabaf7d5775da447af1fc16366b7828c2a 100644 (file)
@@ -263,7 +263,12 @@ GtkTextView { // This will get overridden by .view, needed by gedit line numbers
 
   .linked:not(.vertical) > & { @extend %linked; }
 
-  .linked:not(.vertical) > &:focus + * { border-left-color: entry_focus_border(); } // colors the border of the widget following a focused entry
+  .linked:not(.vertical) > &:focus + .entry,
+  .linked:not(.vertical) > &:focus + .button,
+  .linked:not(.vertical) > &:focus + GtkComboBox > .the-button-in-the-combobox,
+  .linked:not(.vertical) > &:focus + GtkComboBoxText > .the-button-in-the-combobox {
+    border-left-color: entry_focus_border(); // colors the border of the widget following a focused entry
+  }
 
   // entry error and warning style
   @each $e_type, $e_color in (error, $error_color),
index 2b976465da4eff65c85d486d2f393614ae6a3d8d..8edec165caf0dd93117cd6dd5018479fa6b9c018 100644 (file)
@@ -212,7 +212,7 @@ GtkTextView {
     box-shadow: none; }
     .entry.progressbar:backdrop {
       background-color: transparent; }
-  .linked:not(.vertical) > .entry:focus + * {
+  .linked:not(.vertical) > .entry:focus + .entry, .linked:not(.vertical) > .entry:focus + .button, .linked:not(.vertical) > .entry:focus + GtkComboBox > .the-button-in-the-combobox, .linked:not(.vertical) > .entry:focus + GtkComboBoxText > .the-button-in-the-combobox {
     border-left-color: #0f2b48; }
   .entry.error {
     color: #cc0000;
index 7d802ed0914eab5a07274fa20e04886431726c5c..b878181c4f2b7993762b2f7b9f13b98ee2d605fa 100644 (file)
@@ -212,7 +212,7 @@ GtkTextView {
     box-shadow: none; }
     .entry.progressbar:backdrop {
       background-color: transparent; }
-  .linked:not(.vertical) > .entry:focus + * {
+  .linked:not(.vertical) > .entry:focus + .entry, .linked:not(.vertical) > .entry:focus + .button, .linked:not(.vertical) > .entry:focus + GtkComboBox > .the-button-in-the-combobox, .linked:not(.vertical) > .entry:focus + GtkComboBoxText > .the-button-in-the-combobox {
     border-left-color: #4a90d9; }
   .entry.error {
     color: #cc0000;